package com.cx.common.constant;

/**
 * @Author:chenxiaoyi
 * @Date:2020/8/10 9:30
 */
public class MqConstant {
    /**
     * 定义交换机
     */
    public static class Exchange{
        public static final String DIRECT = "direct.exchange";

        public static final String FANOUT = "fanout.exchange";

        public static final String TOPIC = "topic.exchange";
    }

    /**
     * 定义队列
     */
    public static class Queue{
        public static final String D_QUEUE_A = "d.queue.a";

        public static final String D_QUEUE_B = "d.queue.b";

        public static final String F_QUEUE_A = "f.queue.a";

        public static final String F_QUEUE_B = "f.queue.b";

        public static final String T_QUEUE_A = "t.queue.order";

        public static final String T_QUEUE_B = "t.queue.good";
    }

    /**
     * 定义路由键
     * 对于主题Topic交换机路由键匹配规则
     *  1)  # -- >=0个或多个字符
     *  2)  * --  =1个字符
     */
    public static class RoutingKey{
        public static final String D_ROUTINGKEY = "d.routingkey";

        public static final String D_ROUTINGKEY_O = "d.routingkey.o";

        public static final String T_ROUTINGKEY_LAST = "routingkey.*";

        public static final String T_ROUTINGKEY_DYNAMIC = "*.routingkey.#";
    }

}
